;; extends

; hide useless characters
(_ (";" @conceal (#set! conceal "")) .)
(condition ("(" @conceal (#set! conceal "")))
(condition (")" @conceal (#set! conceal "")))
(enhanced_for_statement ("(" @conceal (#set! conceal "")))
(enhanced_for_statement (")" @conceal (#set! conceal "")))
(catch_clause ("(" @conceal (#set! conceal "")))
(catch_clause (")" @conceal (#set! conceal "")))

; prettier operators
("=" @operator (#set! conceal "≔"))
(assignment_expression ("=" @operator (#set! conceal "←")))
("!" @operator (#set! conceal "¬"))
("!=" @operator (#set! conceal "≠"))
("&" @operator (#set! conceal "∩"))
("&&" @operator (#set! conceal "∧"))
(binary_expression ("*" @operator (#set! conceal "⋅")))
("<<" @operator (#set! conceal "«"))
("<=" @operator (#set! conceal "≤"))
("==" @operator (#set! conceal "="))
(">=" @operator (#set! conceal "≥"))
(">>" @operator (#set! conceal "»"))
("^" @operator (#set! conceal "△"))
("|" @operator (#set! conceal "∪"))
("||" @operator (#set! conceal "∨"))

; prettier constants
((true) @boolean (#set! conceal "✔"))
((false) @boolean (#set! conceal "✘"))
((null_literal) @constant (#set! conceal "∅"))

; prettier string escapes
; ((escape_sequence) @string.escape (#eq? @string.escape "\\n") (#set! conceal "⏎"))

; shorten annoying keywords
; ("const" @type.qualifier (#set! conceal "©"))
("extends" @keyword (#set! conceal "⊂"))
("private" @type.qualifier (#set! conceal "󰌾"))
("protected" @type.qualifier (#set! conceal "󱚩"))
("public" @type.qualifier (#set! conceal "󰿆"))
(scoped_identifier scope: ((identifier) @variable (#eq? @variable "java") (#set! conceal "")))

; prettier punctuation
(type_arguments ("<" @punctuation.bracket (#set! conceal "⟨")))
(type_arguments (">" @punctuation.bracket (#set! conceal "⟩")))

; correct syntax highlighting
((type_identifier) @keyword (#eq? @keyword "var"))
